home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / util / rexx / savetime.rea < prev    next >
Text File  |  1997-05-03  |  5KB  |  146 lines

  1. Short:    Miami script to save the ntp time - 1.1
  2. Author:   geohei@ibm.net (Georges Heinesch)
  3. Uploader: geohei@ibm.net (Georges Heinesch)
  4. Version:  1.1 (04 Apr 1997)
  5. Type:     util/rexx
  6. Requires: Miami 1.1 or better
  7.  
  8.  
  9.  
  10. $VER: savetime.miami 1.1 (04 Apr 1997)
  11.  
  12. savetime.miami for Miami 1.1 or better
  13. © Georges Heinesch <geohei@ibm.net>, Luxembourg
  14.   http://www.geocities.com/yosemite/2480
  15.   PGP 2.6.3i public key available on request and on public servers
  16.  
  17.  
  18.  
  19. This script should be used when requesting the correct  time  from  an  ntp
  20. server  (time  server).  If an ntp server is queried, it updates the system
  21. time. This script saves this updated time to the battery clock of the Amiga
  22. and optionally creates a logfile to keep track of the correction applied to
  23. the system time.
  24.  
  25. To  get  an  address  from  an  adequate  ntp  server,  have  a   look   at
  26. 'http://www.cis.udel.edu/~mills/ntp/servers.html'.  Choose  one  and insert
  27. the address into the relevant string  gadget  (bottom  of  'TCP/IP'  page).
  28. Don't forget to activate the 'Get Time' switch.
  29.  
  30. Then enter the path/name of this script  (e.g.  ARexx/savetime.miami)  into
  31. the  'Online' string gadget ('Events' page). This starts the script as soon
  32. as the ntp server transmitted the time information.
  33.  
  34. Optionally,  the  corrections  applied  to  the  current system time can be
  35. logged to a file. If this is desired, set  the  'log'  variable  to  'true'
  36. (default  is  'true')  and  enter the path/name of the log file (default is
  37. 'Miami_Time.log').
  38.  
  39. Example of a log file:
  40.  
  41. Date          old time  ntp time  error
  42. ---------     --------  --------  ---------
  43. 02-Feb-97     19:05:34  19:05:35  -00:00:01
  44. 02-Feb-97     19:08:54  19:08:55   00:00:00
  45. 02-Feb-97     19:16:06  19:16:06  -00:00:02
  46. 02-Feb-97     19:19:29  19:19:29  +00:00:03
  47. 02-Feb-97     19:20:49  19:20:49  -00:00:02
  48.  
  49. The variable 'secdelta' takes system speed into account and has to  be  set
  50. accordingly.  Fast  systems  use  1 (68060), slow system 2 or 3 (68020). To
  51. find the correct value, run the script a  couple  of  times  with  the  log
  52. option  enabled and analyse the log file. The average of the time errors is
  53. the value to enter here (in seconds).
  54.  
  55. ENVARC:TZ must be set up correctly as well. Have a look at 'http://www.ifh.
  56. de/computing/manuals/infohtml/glibc/library_318.html'   for   details.  For
  57. Luxembourg, I have "CET-1". For some  reason,  "CET-1CEST-2"  doesn't  work
  58. properly  on  the  Amiga.  Therefore,  I  change TZ manually to "CET-2" for
  59. daylight saving. Apparently, TZ only accepts 3 digits as national time zone
  60. code.  In  fact,  the  3  digits  aren't  used, which means that "xxx-1" or
  61. "xxx-2" would work as well.
  62.  
  63. The file "tzdata1997a.tar.gz" gives even more detailed information. It  can
  64. be found at "ftp://elsie.nci.nih.gov/pub". Here the most important zones.
  65.  
  66. africa
  67.  
  68.  -1:00    AAT         Atlantic Africa Time (no longer used)
  69.   0:00    WAT         West Africa Time
  70.   1:00    CAT         Central Africa Time
  71.   2:00    SAT         South Africa Time
  72.   3:00    EAT         East Africa Time
  73.  
  74. asia
  75.  
  76.   2:00    EET   EEST  Eastern European Time
  77.   2:00    IST   IDT   Israel
  78.   3:00    AST   ADT   Arabia
  79.   4:00    GST         Gulf
  80.   5:30    IST         India
  81.   7:00    ICT         Indochina
  82.   8:00    CST         China
  83.   9:00    JST         Japan
  84.   9:00    KST         Korea
  85.   9:30    CST         (Australian) Central Standard Time
  86.  
  87. australasia
  88.  
  89.   8:00    WST   WST   Western Australia
  90.   9:00    JST         Japan
  91.   9:30    CST   CST   Central Australia
  92.  10:00    EST   EST   Eastern Australia
  93.  10:00    GST         Guam
  94.  10:30    LHST  LHST  Lord Howe
  95.  12:00    NZST  NZDT  New Zealand
  96.  12:45    CHAST CHADT Chatham
  97. -11:00    SST         Samoa
  98. -10:00    HST         Hawaii
  99.  
  100. europe
  101.  
  102.  -4:00    AST         Atlantic
  103.  -3:00    WGT   WGST  Western Greenland
  104.  -1:00    EGT   EGST  Eastern Greenland
  105.   0:00    GMT   BST   Greenwich, British Summer
  106.   0:00    GMT   IST   Greenwich, Irish Summer
  107.   0:00    WET   WEST  Western Europe
  108.   1:00    CET   CEST  Central Europe
  109.   2:00    EET   EEST  Eastern Europe
  110.   3:00    MSK   MSD   Moscow
  111.  
  112. northamerica
  113.  
  114.  -4:00    AST   ADT   Atlantic
  115.  -5:00    EST   EDT   Eastern Standard Time
  116.  -6:00    CST   CDT   Central Standard Time
  117.  -7:00    MST   MDT   Mountain Stantard Time
  118.  -8:00    PST   PDT   Pacific Standard Time
  119.  -9:00    YST         Yukon Standard Time
  120. -10:00    HST         Hawaii Standard Time
  121.  
  122. southamerica
  123.  
  124.  -2:00    FST   FDT   Fernando de Noronha
  125.  -3:00    EST   EDT   Eastern Brazil
  126.  -4:00    WST   WDT   Western Brazil
  127.  -4:00    AST   ADT   Atlantic
  128.  -5:00    AST   ADT   Acre
  129.  
  130.  
  131.  
  132. $HISTORY:
  133.  
  134. 18 Feb 1997 : 1.0  : First release.
  135. 04 Apr 1997 : 1.1  : Serveral bug fixes
  136.  
  137.  
  138. ============================= Archive contents =============================
  139.  
  140. Original  Packed Ratio    Date     Time    Name
  141. -------- ------- ----- --------- --------  -------------
  142.     2564     965 62.3% 06-Apr-97 13:58:02  savetime.miami
  143.     4665    2068 55.6% 06-Apr-97 14:04:58  savetime.readme
  144. -------- ------- ----- --------- --------
  145.     7229    3033 58.0% 06-Apr-97 23:32:18   2 files
  146.